home *** CD-ROM | disk | FTP | other *** search
- Path: mudskipper.cac.psu.edu!user
- From: fcusack@tdx.org (frank.)
- Newsgroups: comp.lang.c
- Subject: Re: Why doesn't this compile?
- Date: Mon, 18 Mar 1996 06:06:51 -0400
- Organization: Soylent Green is People!!
- Message-ID: <fcusack-1803960606510001@mudskipper.cac.psu.edu>
- References: <4igck9$idj@masala.cc.uh.edu>
- NNTP-Posting-Host: mudskipper.cac.psu.edu
-
- In article <4igck9$idj@masala.cc.uh.edu>, BSamuel@uh.edu (Binoy K. Samuel)
- wrote:
-
- > Hi:
- >
- > I am taking a C class this semester.
- >
- > And I have just written a program that runs (more or less) quite well.
- >
- > However, when I try to compile it, I get the following error:
- >
- > "Call to function 'evalchar' with no prototype"
- >
- > Why does this happen? 'Evalchar' is a function that I wrote. What
- > prototype should I be looking for.
- >
- > Here's the function header line:
- >
- > char evalchar(cnum)
- > int cnum;
- >
- Are they actually teaching you this? This is not ANSI C, and you should
- complain vehemently. Should be
-
- char evalchar(char);
-
- (note I made the int a char, since that what the function is doing...)
-
- You must make sure that the compiler sees the prototype before the
- function is used. (either in a header file, or at the very top of your
- program).
-
- ~Frank
- - Through the modem, past the router, over the firewall.. nothing but Net -
- - PGP ID: 1C0F6685 | NCB#56 | Visit me --> http://www.tdx.org/~fcusack/ -
-